package fei.zhou.lambdalearn.demo4;

/**
 * 描述该类- JPA
 *
 * @author zhoufei
 * @class: Toshow
 * @date 2020/12/22 20:49
 * @Verson 1.0 -2020/12/22 20:49
 * @see
 */
public class Demo2 {
    
    public static void main(String[] args) {
        Toshow method = method();
        method.toSee("小苗");

    }
    
    public static Toshow method() {
//        // 匿名内部类
//        return new Toshow() {
//            @Override
//            public void toSee(String userName) {
//                System.out.println(userName);
//            }
//        };
        
        return (String s) -> {
            System.out.println(s);
        };
        
    }
    
    interface Toshow {
        void toSee(String userName);
    }
    
}